Decouple frozendict support from the library#59
Merged
DMRobertson merged 7 commits intomainfrom Mar 14, 2023
Merged
Conversation
8ef8cab to
060369e
Compare
squahtx
approved these changes
Mar 14, 2023
Contributor
squahtx
left a comment
There was a problem hiding this comment.
Looks like a good approach!
Contributor
Author
|
Thanks. I'll hold off from merging until I've tested this with Synapse. |
clokep
reviewed
Mar 14, 2023
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
DMRobertson
pushed a commit
to matrix-org/synapse
that referenced
this pull request
Mar 14, 2023
Merged
DMRobertson
commented
Mar 14, 2023
clokep
reviewed
Mar 14, 2023
Comment on lines
+63
to
+64
| A preserialisation hook allows you to encode objects which aren't encodable by the | ||
| standard library ``JSONEncoder``. |
Member
There was a problem hiding this comment.
Did you want to update the version or changelog in this PR or will do it separate?
Contributor
Author
There was a problem hiding this comment.
Was going to leave it---I think we usually make bumping the version number part of a release
Contributor
Author
|
I tested Synapse against this in matrix-org/synapse@266370c and matrix-org/synapse@03e63ab. This passed trial and sytest, see https://github.com/matrix-org/synapse/actions/runs/4419129723/jobs/7747311770 (The other failures are due to me using a |
added 2 commits
March 14, 2023 19:13
DMRobertson
pushed a commit
to matrix-org/synapse
that referenced
this pull request
Mar 15, 2023
DMRobertson
pushed a commit
to matrix-org/synapse
that referenced
this pull request
Mar 15, 2023
DMRobertson
pushed a commit
to matrix-org/synapse
that referenced
this pull request
Mar 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commitwise reviewable.
Effectively fixes #58, by allowing consumers (Synapse) to register a preserialisation callback for immutabledict.
Breaking change; will need a semver major bump. Consumers can add back support for frozendict by registering a preserialisation callback.
Synapse 1.62 started requiring semver-bounds on canonicaljson in matrix-org/synapse#13082, and I couldn't see anything else which imports canonicaljson on my machine. So only brand-new PyPI installations of Synapse 1.61 or earlier should be broken by this change. (Indeed, the point of that PR was exactly to allow us to make this kind of change.)